package com.example.jackson.csv;

import lombok.Data;

@Data
public class PageRow {
    private String category;
    private String title;
    private String url;
    private String author;
    private String authorUrl;
    private int replyCount;
    private int downloadCount;
    private String lastReport;

    public static PageRow test(String category, String title, String url, String author, String authorUrl, String lastReport) {
        PageRow row = new PageRow();
        row.setCategory(category);
        row.setTitle(title);
        row.setUrl(url);
        row.setAuthor(author);
        row.setAuthorUrl(authorUrl);
        int r = (int) (Math.random() * 100);
        row.setReplyCount(r % 11);
        row.setDownloadCount(r % 3);
        row.setLastReport(lastReport);
        return row;
    }
}
